Basic blog collection, Frank Montmarquet 6/11/07

Installation  and setup:
------------------------

Copy the template(s) to your forums templates directory. The templates are all setup to use the same copy of the language file so the BlogCommon directory will also need to be copied to the templates directory. Each template is supplied only with a header, footer, info, css and settings file so you need to copy the contents of the CommonTplFiles directory to each template that you will be using in order to make a complate template.

You can avoid keeping duplicate copies of all the common files by using the cs_template_manager.php module. In that case copy the files to BlogCommon put {var template_source BlogCommon} in your settings.tpl, read the docs that come with the mod. Remember to turn on the mod.

Remove the lorum ipsum latin stuff from the headers and put in your own content!


Common Language File
--------------------

These templates are set up for using a common language file.

The preset directory for these is BlogCommon. It contains a lang directory for the language files. As used here common means that all the blog templates use the same copy of the file, they do not have copies in each template directory.

The directory to use is set in the settings.tpl by: {var blog_lang_path BlogCommon }

The code for implementing the common language file is at the top of the header.tpl.

If you do not want to use the common language file edit settings.tpl and change
{var blog_lang_path BlogCommon } to {var blog_lang_path } or delete it or comment it out.

You then must put a lang directory with language files in the template's directory.
You can set blog_lang_path to any directory containing a lang subdirectory as long as it is in the forum templates directory like: {var blog_lang_path AnotherDirName }

The language file is merged with the Phorum language file. This adds new strings while allowing the standard Phorum stings to be used. If there are strings with duplicate keys, the blog language string will overwrite the Phorum string. This makes it possible to change strings to suit a blog while still having the standard strings available for the forum. An example, the standard Phorum language has:
"CloseThread"     =>    "Close this Thread", but for a blog we redefine it to 
"CloseThread"     =>    "Close to New Comments". If you add to or change a language file be sure to get all the quotes and comas in the right place.


Changing Column Positions
-------------------------

The columns in the templates are divs not tables. They are floated either right or left. You can change the position of the columns by changing  how they are floated in the css.tpl, you do not have to edit the header or footer.

In the 2 column blog you just change left to right and right to left and the columns will change places.

In the 3 column blog the blog-column and sidebar-column are grouped together inside the insidewrap div. The links-column is outside of this div. So, the links and blog/sidebar can change places and the blog and sidebar can change places. Other arrangements require changing what is grouped inside the insidewraper.


Changing Widths
---------------

A disadvantage of using all floats for column layout is that it will break if the div cannot hold what you put in it.

Example: if you put a 3px border around the 3 col blog you add 6 px to the blog-column div, so you need to make the blog-column div's (blogcolwidth in settings) width 6 px smaller, to 394px, or make insidewrapwidth 6 px larger to 606 which would then require the page width be 806.  The first method, making the blogcolwidth small is usually easier.

Remember, padding and borders add to the width, so a blog-column div width of 400 with a 3 px border needs to be in a container that has a least 406px of room. Remember also that the container can have other things that take up space. If the sidebar is 200 and the inside wrapper is 600, 400 is left for the blog col. Making the blog col 394 will work because 394+6 = 400 so it fits. Best is to decide on the overall outside (page) width and work your way in.

Padding also adds to the width, so each column has an inner div, change it's margin instead of using padding and you will not have to change any widths; or use padding only on the inner div.

All the columns have overflow: hidden which will prevent (in modern browsers) large content (long words or wide images) from breaking the layout.


Explanation of some of the setting.tpl settings:
------------------------------------------------

{var blog_lang_path BlogCommon }

This is used to set the directory containing the lang directory. This will allow many blogs to use a common language file, just like all you forums use the same file.  "BlogCommon" can be replaced by any directory name in the templates directory that has a lang subdirectory with valad language.php file(s). If the directory is null or is not valid an atempt to use a lang directory in the current tempalate directory will be made. The code that implements this is in the top of the header files. As supplied BlogCommon contains a lang subdirectory with an english.php file.


For the following 1 = true and 0 = false

{var date_in_head 1} if set to 1 the posintg date will be displayed first in an added entry header div. If set to 0 the date will be last as in the standard template.

NOTE: to do this it was necessary to deconstruct the short date to a unix time stamp then reformat to a long style date. The code for this is in list.tpl It works with a short date as month/day/year.  If you have a different short date you can change it to m/d/y in your main Phorum language file or change the order of things in the list statement or scanf to match what you have. You can change the displayed date format by changing the strftime function parameters, see the php documentation. This was required because the date stamp is replaced by the formated date and is not avalable in the list.tpl. I think this will be changed in Phorum 5.2

{var display_newflag 1}  Turns on and off the display of the new flag. The new flag will be displayed when a user is logged in and has unread posts. It will link to the first unread comment in each entry and also flag new entries.

{var display_entry_author 1} If set to 0 the entry author will not be displayed.

{var entry_linked_author 0} If the author is displayed and this is set to 1 it will be a linked author

{var comments_linked_author 0} Turns on or off the display of linked author for comments

{var display_addcomment_link 1} Turns on or off the display of an 'add your comment link'. This links to the posting form for adding a comment. This link is displayed only if there are no comments, if there are comments the standard comment link is displayed.

